package sctu.edu.java.year2016.team06.yuweimei.day20160521.chapter4_1;


/**
 * 编写Java程序，实现判断变量X是奇数还是偶数。
 * Created by asus on 2016/5/24.
 */

import java.util.Scanner;

public class Judge {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入变量x:");
        int x = scan.nextInt();
        if (x % 2 == 0) {
            System.out.println("经判断x是偶数！");

        } else {
            System.out.println("经判断x是奇数！");
        }
    }
}

